﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>
  
  <link href="${ctx.resource}/css/shiftform.css" rel="stylesheet">
  <link href="${ctx.resource}/css/select2.css" rel="stylesheet">
  <link href="${ctx.resource}/css/select2-bootstrap.css" rel="stylesheet">
  
  <title></title>

</head>

<body>

  <%@ include file="/WEB-INF/include/header.jsp"%>

  <%@ include file="/WEB-INF/include/menu.jsp"%>

  <div class="container main-content">

    <div class="panel panel-default beast-panel beast-panel-layout">

      <div class="panel-heading">
        <ol class="breadcrumb">
          <li><a href="${ctx.host}/customer">任务管理</a></li>
          <li class="active">用户任务管理</li>
        </ol>
      </div>

      <div class="panel-body">

        <div class="col-xs-2 beast-panel-layout-left no-horizontal-padding">
          <%@ include file="/WEB-INF/include/submenu.jsp"%>
        </div>

        <div class="col-xs-10 beast-panel-layout-right">

          <div class="beast-breadcrumb-wrapper">
            <div class="beast-breadcrumb clearfix">
              <h2><i class="glyphicon glyphicon-fire" title="用户任务管理"></i>&nbsp;&nbsp;<span>用户任务审核&nbsp;-&nbsp;任务审核详情</span></h2>
            </div>
          </div>
          
          <div class="beast-toolbar-wrapper top-margin-20 clearfix">
			<div class="text-right"
				style="padding-top: 10px; padding-bottom: 10px; border-bottom: 2px solid #CCC;">
				<button type="button"
					class="btn btn-default btn-shadow btn-shadow-default demo2do-btn"
					onclick="window.location.href='javascript:history.go(-1)'">
					<i class="glyphicon glyphicon-arrow-left"></i>&nbsp;&nbsp;返回
				</button>
				<a href="${ctx.host}/task-audits/${id}/auditPass"
					data-toggle="modal" data-target="#"
					class="btn btn-success btn-shadow btn-shadow-success demo2do-btn"><i
					class="glyphicon glyphicon-arrow-left"></i>&nbsp;&nbsp;审核通过</a>
			  <a href="${ctx.host}/task-audits/${id}/auditUnpass" 
			    data-toggle="modal" data-target="#"  
			    class="btn btn-success btn-shadow btn-shadow-success demo2do-btn" ><i
			    class="glyphicon glyphicon-arrow-left"></i>&nbsp;&nbsp;审核不通过</a>
			  
			</div>
		 </div>
          
          <div class="beast-breadcrumb-wrapper top-margin-20">
            <div class="beast-breadcrumb yellow clearfix">
              <h2>
                <span>任务基本信息</span>
              </h2>
            </div>
          </div> 
          <div class="row">
          
	          <div class="col-xs-7">
		          <div class="form-horizontal bottom-margin-20">
		            <div class="form-group">
		                <label class="col-xs-3 control-label">用户编号：</label>
		                <div class="col-xs-8 pull-left"><p class="form-control-static">${task.id }</p></div>
		            </div>
		            <div class="form-group">   
		                <label class="col-xs-3 control-label">用户名称：</label>
		                <div class="col-xs-8 pull-left"><p class="form-control-static">${task.customer.profile.nickName }</p>
		                </div>
		            </div>
		            <div class="form-group">
		                <label class="col-xs-3 control-label">创建时间：</label>
		                <div class="col-xs-8 pull-left"><p class="form-control-static"><fmt:formatDate value="${task.startDate }" pattern="yyyy-MM-dd HH:mm:ss" /></p></div>
		            </div>
		            <div class="form-group">
		                <label class="col-xs-3 control-label">投放平台：</label>
		                <div class="col-xs-8 pull-left"><p class="form-control-static">${task.advertisement.socialType.description }</p></div>
		            </div>
		            <div class="form-group">
	                <label class="col-xs-3 control-label">审核图片：</label>
	                <div class="col-xs-8">
	                    <img src="${ctx.qiniu}/${task.screenshot}" style="width:300px;"/>
	                </div>
	                <div style="float: left;width: 30px;"><a href="${ctx.qiniu}/${task.screenshot}" target="_blank">查看大图</a></div>
          
          
	              </div>
		          </div>
	          </div>
	          <div class="col-xs-5">
              <div class="beast-box" style="margin-top:20px;">
                <div class="clearfix box-bar beast-box-bar beast-box-header">
                  <h2 class="pull-left">审核流程</h2>
                </div>
                <div class="clearfix beast-box-item">
                  <label class="pull-left">1.&nbsp;&nbsp;查看&nbsp;<span style="color: #ff8111">基本信息</span>：确认基本信息是否&nbsp;<span style="color: #ff8111">出错</span>。</label>
                </div>
                <div class="clearfix beast-box-item">
                  <label class="pull-left">2.&nbsp;&nbsp;点击&nbsp;<span style="color: #ff8111">审核通过</span></label>
                </div>
              </div>
            </div>
	          
          </div>

					<div class="beast-breadcrumb-wrapper top-margin-20">
						<div class="beast-breadcrumb yellow clearfix">
							<h2>
								<span>广告信息</span>
							</h2>
						</div>
					</div>

					<div class="form-horizontal bottom-margin-20">

						<div class="form-group demo2do-form-group">
							<label class="col-xs-10 control-label" style="text-align: left;"><strong>基本信息&nbsp;&nbsp;&nbsp;&nbsp;</strong></label>
						</div>

						<div class="form-group top-margin-20">
							<label class="col-xs-2 control-label">投放名称：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">${task.advertisement.adTitle }</p>
							</div>
							<label class="col-xs-2 control-label">广告主名：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">
									<a href="${task.advertisement.aduser.company.website }"
										target="_BLANK">${task.advertisement.aduser.profile.userName }</a>
								</p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-xs-2 control-label">创建时间：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">
									<fmt:formatDate value="${task.advertisement.createDate}"
										pattern="yyyy-MM-dd" />
								</p>
							</div>
							<label class="col-xs-2 control-label">投放时间：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">
									<fmt:formatDate value="${task.advertisement.startDate }"
										pattern="yyyy-MM-dd" />
									&nbsp;-&nbsp;
									<fmt:formatDate value="${task.advertisement.endDate }"
										pattern="yyyy-MM-dd" />
								</p>
							</div>
						</div>

						<div class="form-group demo2do-form-group">
							<label class="col-xs-10 control-label" style="text-align: left;"><strong>投放要求&nbsp;&nbsp;&nbsp;&nbsp;</strong></label>
						</div>

						<div class="form-group">
							<label class="col-xs-2 control-label">投放平台：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">${task.advertisement.socialType.description }</p>
							</div>
							<label class="col-xs-2 control-label">投放目标：</label>
							<div class="col-xs-4 pull-left">
								<c:choose>
									<c:when test="${task.advertisement.type eq 'BUDGET'}">
										<p class="form-control-static">${task.advertisement.putNumber}&nbsp;元</p>
									</c:when>
									<c:when test="${task.advertisement.type eq 'QUANTITY'}">
										<p class="form-control-static">${task.advertisement.putNumber}&nbsp;阅读量</p>
									</c:when>
								</c:choose>
							</div>
						</div>

						<div class="form-group">
							<label class="col-xs-2 control-label">投放类型：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">${task.advertisement.type.description}</p>
							</div>
							<label class="col-xs-2 control-label">已完成：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">${task.advertisement.claimNumber}&nbsp;完成</p>
							</div>
						</div>

						<div class="form-group demo2do-form-group">
							<label class="col-xs-10 control-label" style="text-align: left;"><strong>投放标签&nbsp;&nbsp;&nbsp;&nbsp;</strong></label>
						</div>

						<div class="form-group top-margin-20">
							<label class="col-xs-2 control-label">兴趣标签：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">
									<c:forEach var="interestTagCode"
										items="${task.advertisement.advertisementTag.stringInterestTagCodes}">
										<label class="label label-outline label-info">${persist.interestTags[interestTagCode].name}</label>
									</c:forEach>
								</p>
							</div>
							<label class="col-xs-2 control-label">生活标签：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">
									<c:forEach var="lifeTagCode"
										items="${task.advertisement.advertisementTag.stringLifeTagCodes}">
										<label class="label label-outline label-info">${persist.lifeTags[lifeTagCode].name}</label>
									</c:forEach>
								</p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-xs-2 control-label">性别标签：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">
									<c:forEach var="sexTagCode"
										items="${task.advertisement.advertisementTag.stringSexTag}">
										<label class="label label-outline label-info">${persist.sexTags[sexTagCode].name}</label>
									</c:forEach>
								</p>
							</div>
							
							<label class="col-xs-2 control-label">地域标签：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">
									<c:forEach var="areaTagCode"
										items="${task.advertisement.advertisementTag.stringAreaTag}">
										<label class="label label-outline label-info">${persist.areaTags[areaTagCode].name}</label>
									</c:forEach>
								</p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-xs-2 control-label">年龄标签：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">
									<c:forEach var="ageTagCode"
										items="${task.advertisement.advertisementTag.stringAgeTag}">
										<label class="label label-outline label-info">${persist.ageTags[ageTagCode].name}</label>
									</c:forEach>
								</p>
							</div>
						</div>

						<div class="form-group demo2do-form-group">
							<label class="col-xs-10 control-label" style="text-align: left;"><strong>广告素材&nbsp;&nbsp;&nbsp;&nbsp;</strong></label>
						</div>

						<div class="form-group top-margin-20">
							<label class="col-xs-2 control-label">文字描述：</label>
							<div class="col-xs-9 col-xs-offset-2">
								<p class="form-control-static">${task.advertisement.material.description }</p>
							</div>
						</div>

						<c:choose>
							<c:when
								test="${task.advertisement.material.type.name eq 'GRAPHIC'}">
								<div class="form-group">
									<label class="col-xs-2 control-label">图文素材：</label>
									<div class="col-xs-9 col-xs-offset-2">
										<div class="row">
											<c:forEach var="materialImage"
												items="${task.advertisement.material.materialImages}">
												<div class="col-md-2">
													<img alt="" src="${ctx.qiniu}/${materialImage.image}!200">
												</div>
											</c:forEach>
										</div>
									</div>
								</div>
							</c:when>
							<c:otherwise>
								<div class="form-group">
									<label class="col-xs-2 control-label">链接素材：</label>
									<div class="col-xs-9 col-xs-offset-2">
										<textarea class="form-control" rows="3" readonly>${task.advertisement.material.link}</textarea>
									</div>
								</div>
							</c:otherwise>
						</c:choose>

					</div>

				</div>
				
      </div>
    </div>

  </div>

  <%@ include file="/WEB-INF/include/footer.jsp"%>
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <script src="${ctx.resource}/js/shiftform.js"></script>
  <script src="${ctx.resource}/js/select2.min.js"></script>
  <script src="${ctx.resource}/js/select2_locale_zh-CN.js"></script>
  <script src="${ctx.resource}/js/bootstrap.validate.js"></script>
  <script src="${ctx.resource}/js/bootstrap.validate.en.js"></script>
  

</body>

</html>
